<?php

class Model_Promotion extends ORM {
	
	public function rules() {
		return array(
			'description' => array(
				array('not_empty'),
			),
			'discount_type' => array(
				array('not_empty'),
			),
			'discount' => array(
				array('not_empty'),
				array('digit'),
			),
		);
	}
	
	protected $_has_many = array(
		'items' => array(
			'model' => 'item',
			'through' => 'promotionitems'
		),
	);
	
}